package com.vhly.aapt;

import com.vhly.aapt.io.OrderInputStream;

import java.io.IOException;

/**
 * Created by IntelliJ IDEA.
 * User: vhly[FR]
 * Date: 2010-4-26
 * Time: 16:04:19
 */
public class StringPoolHeader extends ResChunkHeader {
    public int stringCount;
    public int styleCount;
    public int flags;

    // Index from header of the string data.
    public int stringsStart;

    // Index from header of the style data.
    public int stylesStart;

    public void read(OrderInputStream din) throws IOException {
        stringCount = din.readInt();
        styleCount = din.readInt();
        flags = din.readInt();
        stringsStart = din.readInt();
        stylesStart = din.readInt();
    }

    @Override
    public short getHeaderSize() {
        return 0;
    }

    @Override
    public byte[] getData() {
        if (data != null) {
            return data;
        }
        return new byte[0];
    }
}